<?php
/**
 * Pertyler DatabaseManagement
 * DatabaseModel
 * PrivilegeType Class
 *
 * @author	Emre Hasegeli <hasegeli@gmail.com>
 * @license	GNU General Public License v3
 */

namespace Pertyler;

require_once __DIR__ . '/main.php';

require_once __DIR__ . '/aPrivilegeType.php';

class PrivilegeType extends aPrivilegeType
{
	public static function SelectAllArray()
	{
		if(!parent::hasArray())
			foreach(Database::Get()->SelectResultArrayArray('
SELECT id "PrivilegeType",
		"Name"
	FROM pertyler."PrivilegeType"') AS $resultArray)
				new self($resultArray['PrivilegeType'],
						$resultArray['Name']);

		return parent::getAllArray();
	}
}
